<!--conf
<sample>
              <product version="1.5" edition="pro"/>
                     <modifications>
                            <modified date="070101"/>
                     </modifications>
               </sample>
 --> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title> Moving items by API</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
</head>

<body>
	<h1>Moving items</h1>
	
	<table>
		<tr>
			<td>
				<div id="treeboxbox_tree" style="width:250px; height:218px;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"/>
			</td>
            <td>
				<div id="treeboxbox_tree2" style="width:250px; height:218px;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"/>
			</td>
			<td rowspan="2" style="padding-left:25" valign="top">
            <div>Move from left tree to right tree</div>
            </div>
            Move selected<a href="javascript:void(0)" onclick="tree.moveItem(tree.getSelectedItemId(),'item_child',tree2.getSelectedItemId(),tree2)"> to child </a></select>
            </div>
            <div>
            Move selected <a href="javascript:void(0)" onclick="tree.moveItem(tree.getSelectedItemId(),'item_sibling',tree2.getSelectedItemId(),tree2)"> to sibling </a></select>
            </div>
            <br/>
            <div>Move from right tree to left tree</div>
            </div>
            Move selected<a href="javascript:void(0)" onclick="tree2.moveItem(tree2.getSelectedItemId(),'item_child',tree.getSelectedItemId(),tree)"> to child </a></select>
            </div>
            <div>
            Move selected <a href="javascript:void(0)" onclick="tree2.moveItem(tree2.getSelectedItemId(),'item_sibling',tree.getSelectedItemId(),tree)"> to sibling </a></select>
            </div>

            <br/>
            <div>Move inside left tree</div>
             <div>
			Move selected <a href="javascript:void(0)" onclick="tree.moveItem(tree.getSelectedItemId(),'up')"> Up </a> | <a href="javascript:void(0)" onclick="tree.moveItem(tree.getSelectedItemId(),'down')">Down</a> | <a href="javascript:void(0)" onclick="tree.moveItem(tree.getSelectedItemId(),'left')"> Left</a>
            <div>
             <div>
			Move selected <a href="javascript:void(0)" onclick="tree.moveItem(tree.getSelectedItemId(),'up_strict')"> Up on level </a> | <a href="javascript:void(0)" onclick="tree.moveItem(tree.getSelectedItemId(),'down_strict')">Down on level</a>
            <div>
            </div>
            Move selected <a href="javascript:void(0)" onclick="tree.moveItem(tree.getSelectedItemId(),'item_child',this.nextSibling.value)"> to child of </a><select><option value="books">Books</option><option value="sport">Sport</option><option value="magazines">Magazines</option></select>
            </div>
            <div>
            Move selected <a href="javascript:void(0)" onclick="tree.moveItem(tree.getSelectedItemId(),'item_sibling',this.nextSibling.value)"> to sibling of </a><select><option value="books">Books</option><option value="sport">Sport</option><option value="magazines">Magazines</option></select>
            </div>
            </td>
		</tr>
		
	</table>
<br>

	<script>
			tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);

			tree.setSkin('dhx_skyblue');
			tree.setImagePath("../../../codebase/imgs/dhxtree_skyblue/");
			tree.enableSmartXMLParsing(true);
			tree.loadXML("../common/tree.xml")


			tree2=new dhtmlXTreeObject("treeboxbox_tree2","100%","100%",0);



			tree2.setSkin('dhx_skyblue');
			tree2.setImagePath("../../../codebase/imgs/dhxtree_skyblue/");
			tree2.enableSmartXMLParsing(true);
			tree2.loadXML("../common/tree.xml")

	</script>
<br><br>

</body>
</html>
